﻿#region File and License Information
/*
<File>
	<License>
		Copyright © 2009 - 2017, Daniel Vaughan. All rights reserved.
		This file is part of Calcium (http://calciumsdk.net), 
		which is released under the MIT License.
		See file /Documentation/License.txt for details.
	</License>
	<CreationDate>2013-03-21 20:07:26Z</CreationDate>
</File>
*/
#endregion

using System;

namespace Outcoder.Services.DialogService
{
	public class QuestionResponse<TResponse>// where TResponse : class, IQuestionResult
	{
		public IQuestion<TResponse> Question { get; private set; }
		public TResponse Response { get; private set; }
		public Exception Error { get; private set; }

		public QuestionResponse(TResponse result, IQuestion<TResponse> question, Exception error = null)
		{
			Response = result;
			Question = ArgumentValidator.AssertNotNull(question, "question");
			Error = error;
		}

//		public bool HasValidResponse
//		{
//			get
//			{
//				return Error == null && Response != null && Response.HasValidAnswer;
//			}
//		}
	}
}